package com.qk.management.controller;

import com.github.pagehelper.Page;
import com.qk.common.util.PageResult;
import com.qk.common.util.Result;
import com.qk.dto.log.LogDto;
import com.qk.management.service.LogService;
import com.qk.vo.log.LogVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/logs")
public class LogController {
    @Autowired
    private LogService logService;
    @GetMapping
    public Result getLogList(LogDto logDto) {
        log.info("查询日志", logDto);

        PageResult<LogVo> pr= logService.getLogList(logDto);
        return Result.success(pr);
    }
}
